package com.whoimi.admin.converter;

import com.whoimi.admin.entity.Menu;
import com.whoimi.admin.entity.form.MenuForm;
import com.whoimi.admin.entity.vo.MenuVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface MenuConverter {

    MenuVO toVo(Menu entity);

    @Mapping(target = "params", ignore = true)
    MenuForm toForm(Menu entity);

    @Mapping(target = "params", ignore = true)
    Menu toEntity(MenuForm menuForm);

}